import URL from '@/config/url'
import utils from '@/utils/utils'

export default {
	//tabs分类列表
	getLvieCategory(params = {}) {
		let data = {

		}
		return utils.uniRequest({
			url: URL.BASE + '/live/Live/getCategoryList',
			data
		})
	},
	//tabs分类列表
	getWXLvieCate(params = {}) {
		let data = {
			status:1,
			is_all:1
		}
		return utils.uniRequest({
			url: URL.BASE + '/qywx/living/Living/cateList',
			// url: URL.BASE + '/living/Living/cateList',
			data
		})
	},
	//视频列表
	getLvieList(params = {}) {
		let data = {
			category_id: params.category_id,
			page: params.page,
			pagesize: 10,
		}
		return utils.uniRequest({
			url: URL.BASE + '/live/Live/getList',
			data
		})
	},
	// 直播配置
	getLvieConfig(params = {}) {
		let data = {}
		return utils.uniRequest({
			url: URL.BASE + '/live/Live/getConfig',
			data
		})
	},
	// 直播详情
	getLvieDetailes(params = {}) {
		let data = {
			live_id: params.liveid,
		}
		return utils.uniRequest({
			url: URL.BASE + '/live/Live/getDetail',
			data
		})
	},
	// 直播商品列表
	getLvieGoodsList(params = {}) {
		let data = {
			live_id: params.live_id,
		}
		return utils.uniRequest({
			url: URL.BASE + '/live/Live/getProductList',
			data
		})
	},
	//直播转发
	getForward(params = {}) {
		let data = {
			live_id: params.live_id,
		}
		return utils.uniRequest({
			url: URL.BASE + '/live/Live/forward',
			data
		})
	},
	//直播分享
	getShare(params = {}) {
		let data = {
			live_id: params.live_id,
		}
		return utils.uniRequest({
			url: URL.BASE + '/live/Live/getShareInfo',
			data
		})
	},
	//直播点赞
	getSupport(params = {}) {
		let data = {
			live_id: params.live_id,
			status: params.status,
		}
		return utils.uniRequest({
			url: URL.BASE + '/live/Live/support',
			data
		})
	},
	//直播商品规格
	getSpecs(params = {}) {
		let data = {
			product_id: params.product_id,
		}
		return utils.uniRequest({
			url: URL.BASE + '/shop/product/specs',
			data
		})
	},
	// 假数据
	getArticle(params = {}) {
		let data = {
			limit: 10,
			page: 1,
		}
		return utils.uniRequest({
			url: URL.BASE + '/shop/article/cate',
			data
		})
	},
	// 企业微信直播列表
	getQYLiveList(params = {}) {
		let data = {
			cate_id:params.cate_id,
			pagesize: 10,
			page: params.page,
		}
		return utils.uniRequest({
			url: URL.BASE + '/qywx/living/Living/getList',
			// url: URL.BASE + '/living/Living/getList',
			data
		})
	},
	// 企业微信直播code
	getQYLiveCode(params = {}) {
		let data = {
			living_id: params.living_id,
			openid: params.openid,
		}
		return utils.uniRequest({
			url: URL.BASE + '/qywx/living/Living/getLivingCode',
			// url: URL.BASE + '/living/Living/getLivingCode',
			data
		})
	},
	//小程序直播分享记录
	xcxLiveShare(params = {}) {
		let data = {
			roomid: params.roomid,
			invit_user_id: params.invit_user_id,//分享用户id
		}
		return utils.uniRequest({
			url: URL.BASE + '/wx/live/player/saverecord',
			data
		})
	},
	// 小程序直播列表
	getXcxLiveList(params = {}) {
		let data = {
			cate_id:params.cate_id,
			pagesize: 10,
			page: params.page,
			is_push:params.is_push,
		}
		return utils.uniRequest({
			url: URL.BASE + '/wx/live/player/lists',
			// url: URL.BASE + '/living/Living/getList',
			data
		})
	},
}
